import { request } from 'umi';

// 获取分类名称
export let getCategory = () => {
  return request('/api/category', {
    params: {
      articleStatus: 'publish',
    },
  });
};

// 获取分类列表
export let getCategoryList = (
  id: string,
  page: number = 1,
  pageSize: number = 12,
  status: string = 'publish',
) => {
  return request(`/api/article/category/${id}`, {
    params: {
      page,
      pageSize,
      status,
    },
  });
};
